package com.smyh.protcol;

public class ProtcolStruts {

	/**
	 * 默认本地物理地址：
	 */
	public static final byte[] LOCAL_ADDR_BYTES = {0,0,0,0};
	
	/*
	 * 协议头
	 */
	public static final byte[] START_SIGN = {0x55,(byte) 0xaa};
	/*
	 * 协议结束字节
	 */
	public static final byte END_SIGN = 0x16;
	
	/*
	 * 指令符
	 */
	//本地参数查询1
	public static final byte[] LOCAL_ASK_CMD = {(byte) 0xd2,0x12};
	//本地参数应答0
	public static final byte[] LOCAL_ANSWER_CMD = {(byte) 0xd2,0x12};
	//本地参数整定1
	public static final byte[] LOCAL_PARAM_SET_CMD = {(byte) 0xd2,0x11};
	
	/**
	 * 操作返回指令
	 */
	//设备返回操作成功指令
	public static final byte[] OPTION_ANSWER_SUCC = {0x23,0};
	
	//设备返回操作成功指令
	public static final byte[] OPTION_ANSWER_FAIL = {0x23,1};
	
	/**
	 * 遥测
	 * 遥信数据报文
	 */
	public static final byte[] CHANGE_DIGIT_MOCK_ANSWER_CMD = {(byte) 0xd2,0x30};
	/*
	 * 寻呼指令
	 */
	//整定设备》》终端
	//寻呼-群发信息1
	public static final byte[] ALL_CALL_CMD = {(byte) 0xd2,0x4};
	//寻呼应答-0
	public static final byte[] ALL_CALL_ANSWER_CMD = {(byte) 0xd2,0x5};
	
	//遥控指令-下发设备-亮灯显示1
	public static final byte[] LIGHT_ON_CMD = {(byte) 0xd2,0x6};

	//设置指令-下发设备-控制通讯透传1
	public static final byte[] COMM_ON_CMD = {(byte) 0xd2,0x7};

	//设置指令-下发设备-取消-停止通讯透传1
	public static final byte[] COMM_OFF_CMD = {(byte) 0xd2,0x8};

	//主动掉线指令-取消-停止呼叫等待1
	public static final byte[] WAIT_OFF_LIVE_CMD = {(byte) 0xd2,0x9};

	//遥控指令-下发设备-停止亮灯1
	public static final byte[] LIGHT_OFF_CMD = {(byte) 0xd2,0xa};

	

	//终端参数查询1
	public static final byte[] DEVICE_ASK_CMD = {(byte) 0xd2,0x15};
	//终端参数应答0
	public static final byte[] DEVICE_ANSWER_CMD = {(byte) 0xd2,0x15};
	//终端参数整定1
	public static final byte[] DEVICE_PARAM_SET_CMD = {(byte) 0xd2,0x13};
	
	//外设参数查询1
	public static final byte[] OUTER_ASK_CMD = {(byte) 0xd2,0x18};
	//外设参数应答0
	public static final byte[] OUTER_ANSWER_CMD = {(byte) 0xd2,0x18};
	//外设参数整定1
	public static final byte[] OUTER_PARAM_SET_CMD = {(byte) 0xd2,0x17};
	
	
	//接收到正确报文，短帧确认
	public static final byte[] SURE_MSG_SUC = {(byte) 0xe5,(byte) 0xe5};
	
	//接收到正确报文，短帧确认
	public static final byte[] SURE_MSG_CRCFAIL = {(byte) 0x5e,(byte) 0x5e};
	
	//参数查询1
	public static final byte[] DEVICE_CMD = { 0x00,0x00};
	
	
	public static final byte[] OUTER_CONTROL_CMD = {(byte) 0xd2,0x1f};
	
}
